package com.zwy.ubts.service.impl;

import com.zwy.ubts.bean.Address;
import com.zwy.ubts.bean.Book;
import com.zwy.ubts.dao.AddressDao;
import com.zwy.ubts.service.AddressService;
import com.zwy.ubts.service.BaseService;
import com.zwy.ubts.service.BookService;
import com.zwy.ubts.utils.MybatisUtils;

import java.util.List;

/**
 * @Author Zhou Wenying
 * @Description:
 * @Date Created in 21:49 2023/3/27
 */
public class AddressServiceImpl extends BaseService<AddressDao> implements AddressService {

    @Override
    public int insertAddress(Address Address) {
        Integer integer = baseDao.insertAddress(Address);
        commit();
        return integer;
    }

    @Override
    public List<Address> selectAddress(Integer userId) {
        return baseDao.selectAddress(userId);
    }

    @Override
    public int updataDefaultAddr(Address Address) {
        Integer integer = baseDao.updataDefaultAddr(Address);
        commit();
        return integer;
    }
}
